package com.eop.service.impl;

import java.util.List;

import com.eop.dao.IMinutesDao;
import com.eop.entity.Minutes;
import com.eop.service.IMinutesService;

public class MinutesServiceImpl implements IMinutesService{
	private IMinutesDao minutesDao;
	
	public IMinutesDao getMinutesDao() {
		return minutesDao;
	}

	public void setMinutesDao(IMinutesDao minutesDao) {
		this.minutesDao = minutesDao;
	}

	@Override
	public void deleteMinutes(Minutes mt) {
		minutesDao.delete(mt);
	}

	@Override
	public List<Minutes> getAllMinutes() {
		return minutesDao.getAll();
	}

	@Override
	public List<Minutes> getMinutesByEvent(String eventId) {
		return minutesDao.findAllByNamedQuery("sMinutes.getMinutesByEvent",eventId);
	}

	@Override
	public Minutes getMinutesById(String id) {
		return minutesDao.getById(id);
	}

	@Override
	public void saveMinutes(Minutes mt) {
		minutesDao.saveOrUpdate(mt);
	}
	
	
}
